package field_method05;



//导入 java包里面的util包里面的类

import field_method05.son.Scanner;

public class StudentTest {

    public static void main(String[] args) {


        Student student = new Student();
        System.out.println(student.name);//没有初始化值 结果是 null
        System.out.println(student.pet);//没有初始化值 结果是 null
//        student.pet.nickName;//空指针异常
        Pet pet = new Pet();
        student.pet = pet;

        System.out.println(student.pet);

        student.pet.nickName = "虎子231";
        student.pet.age = 2;


        System.out.println(student.pet.nickName);



        //全类名   包名 + 类名
//        new Scanner();
//
//        new java.util.Scanner();

    }
}
